Cathode ray tube (CRT) display technology used today in computers and terminals is primarily raster-scan technology, similar to television sets, except that computer displays are bit mapped and have a frame buffer to hold the bits of data being displayed, whereas television sets display a received signal in real time without storing the signal. When the display is being changed from one image to another, it is desirable that the old image be completely removed by clearing the screen, such as by setting a new background color value, before a new image is displayed on the screen. If either the clear or redraw operations occur during the vertical active time of the display, undesirable "flashing" or "tearing" occurs on the screen. This undesirable effect is not very noticeable when the exchange of images does not occur very often. However, when the exchange of images is very frequent, such as with today's fast 3D display systems, or with multi-media displays wherein a moving image is displayed on the screen and may change frames as often as thirty times per second, the effect of flashing or tearing becomes extremely distracting.
Prior art systems typically wait to start the clearing operation until the raster-scanning electron beam performs a vertical retrace operation. By waiting until vertical retrace starts, the clearing operation will not occur during the active data display time, thus, preventing the flashing or tearing. This has the undesirable effect of delaying each clear until a vertical retrace occurs.
The clearing problem is less severe in systems that have multiple frame buffers attached to the CRT. In this type of system, a new image can be placed in a second frame buffer while a first frame buffer is being displayed. To exchange the images, the CRT simply has to switch from displaying the first frame buffer to displaying the second frame buffer. However, to prevent flashing or tearing, the switching of displaying information from the first buffer to the second buffer must also occur during a vertical retrace. In a window environment, such as with the X window system of the UNIX (tm) operating system, switching must occur on a window basis, rather than on a screen basis.
It is apparent that prior art systems are spending considerable time waiting for vertical retrace to occur before clearing the frame buffer that displays images on a CRT. For example, for a CRT that displays at a 60 Hz rate, each screen scan requires approximately 16 milliseconds. Since a screen clear could be initiated while the beam is scanning at any location on the CRT, on average, the CPU will have to wait for the beam to traverse half the CRT, or approximately 8 milliseconds for a CRT scanning at 60 Hz. Increasingly, monitors scan at 72 Hz, however, this still requires a wait of almost 7 milliseconds.
It is thus apparent that there is need in the art for a system to reduce the amount of time that a CPU spends waiting for a vertical retrace operation to occur in a raster-scan CRT display system before clearing the frame buffer. The present invention meets this and other needs in the art.